﻿<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Thêm Quyền</title>
</head>

<?php include ("../connect.php"); ?>
<?php
if(isset($_POST['txtphan_quyen'])){
	$phan_quyen=$_POST['txtphan_quyen'];
	$ma_quyen = $_POST['txtma_quyen'];
}
?>
<body>
<?php	
    $sql = "INSERT INTO quyen 
	                    VALUES('$ma_quyen', N'$phan_quyen')";
    
					
	$rs=mysql_query($sql);
    if($rs)
	{
		echo "<script>
			alert('Thành công...');
		 	location.href='../index.php?noidung=tq';
			</script>";
		exit;
	}
	else 
	{
		echo "<script>
			alert('Chưa lưu được...');
			document.frmTrolai.submit();
			</script>";
	}
?>
</body>
</html>